package com.guchenbo.spring.boot.example;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * @Author guchenbo
 * @Date 2019/2/24.
 */
@SpringBootApplication
@Slf4j
public class ExampleApplication implements ApplicationRunner {

  @Value("${config.key:default}")
  private String msg;

  public static void main(String[] args) {
    SpringApplication.run(ExampleApplication.class, args);
  }

  @Override
  public void run(ApplicationArguments args) throws Exception {
    log.info("msg: {}", msg);
  }
}
